package com.feifan.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.feifan.oa.mapper.FlowCategoryMapper;
import com.feifan.oa.domain.FlowCategory;
import com.feifan.oa.service.IFlowCategoryService;
import com.feifan.common.core.text.Convert;

/**
 * 流程类别Service业务层处理
 * 
 * @author 非凡
 * @date 2020-06-30
 */
@Service
public class FlowCategoryServiceImpl implements IFlowCategoryService 
{
    @Autowired
    private FlowCategoryMapper flowCategoryMapper;

    /**
     * 查询流程类别
     * 
     * @param id 流程类别ID
     * @return 流程类别
     */
    @Override
    public FlowCategory selectFlowCategoryById(Long id)
    {
        return flowCategoryMapper.selectFlowCategoryById(id);
    }

    /**
     * 查询流程类别列表
     * 
     * @param flowCategory 流程类别
     * @return 流程类别
     */
    @Override
    public List<FlowCategory> selectFlowCategoryList(FlowCategory flowCategory)
    {
        return flowCategoryMapper.selectFlowCategoryList(flowCategory);
    }

    /**
     * 新增流程类别
     * 
     * @param flowCategory 流程类别
     * @return 结果
     */
    @Override
    public int insertFlowCategory(FlowCategory flowCategory)
    {
        return flowCategoryMapper.insertFlowCategory(flowCategory);
    }

    /**
     * 修改流程类别
     * 
     * @param flowCategory 流程类别
     * @return 结果
     */
    @Override
    public int updateFlowCategory(FlowCategory flowCategory)
    {
        return flowCategoryMapper.updateFlowCategory(flowCategory);
    }

    /**
     * 删除流程类别对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFlowCategoryByIds(String ids)
    {
        return flowCategoryMapper.deleteFlowCategoryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除流程类别信息
     * 
     * @param id 流程类别ID
     * @return 结果
     */
    @Override
    public int deleteFlowCategoryById(Long id)
    {
        return flowCategoryMapper.deleteFlowCategoryById(id);
    }
}
